/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AboutDialog.java
 *
 * Created on May 7, 2011, 12:56:36 AM
 */
package uploadphotobucket.view;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 *
 * @author banhbaochay
 */
public class AboutDialog extends javax.swing.JDialog {

    /** Creates new form AboutDialog
     * @param parent
     * @param modal
     * @param locale  
     */
    public AboutDialog(java.awt.Frame parent, boolean modal, Locale locale) {
        super(parent, modal);
        this.locale = locale;
        initComponents();
    }// end constructor

    /**
     * Change language of form
     */
    public void changeLanguage() {
        ResourceBundle rs = ResourceBundle.getBundle("resourcebundle.AboutDialog", locale);
        jLabel3.setText(rs.getString("AboutDialog.jLabel3.text"));
        jLabel4.setText(rs.getString("AboutDialog.jLabel4.text"));
        jLabel5.setText(rs.getString("AboutDialog.jLabel5.text"));
        jLabel6.setText(rs.getString("AboutDialog.jLabel6.text"));
        jLabel7.setText(rs.getString("AboutDialog.jLabel7.text"));
        jLabel8.setText(rs.getString("AboutDialog.jLabel8.text"));
        jLabel28.setText(rs.getString("AboutDialog.jLabel28.text"));
        jLabel29.setText(rs.getString("AboutDialog.jLabel29.text"));
        closeAboutDialogButton.setText(rs.getString("AboutDialog.closeAboutDialogButton.text"));
        setTitle(rs.getString("AboutDialog.title"));
    }// end changeLanguage method
    
    public void localeChanged(Locale locale) {
        this.locale = locale;
    }// end localeChanged method
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        aboutPanel = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        closeAboutDialogButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("resourcebundle/AboutDialog"); // NOI18N
        setTitle(bundle.getString("AboutDialog.title")); // NOI18N

        aboutPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel3.setText(bundle.getString("AboutDialog.jLabel3.text")); // NOI18N
        aboutPanel.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 100, -1, -1));

        jLabel4.setText(bundle.getString("AboutDialog.jLabel4.text")); // NOI18N
        aboutPanel.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 130, 131, -1));

        jLabel5.setText(bundle.getString("AboutDialog.jLabel5.text")); // NOI18N
        aboutPanel.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 190, 470, -1));

        jLabel6.setText(bundle.getString("AboutDialog.jLabel6.text")); // NOI18N
        aboutPanel.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 220, -1, -1));

        jLabel7.setText(bundle.getString("AboutDialog.jLabel7.text")); // NOI18N
        aboutPanel.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 160, 220, -1));

        jLabel8.setText(bundle.getString("AboutDialog.jLabel8.text")); // NOI18N
        aboutPanel.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 270, 680, -1));

        jLabel28.setText(bundle.getString("AboutDialog.jLabel28.text")); // NOI18N
        aboutPanel.add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 40, 460, -1));

        jLabel29.setText(bundle.getString("AboutDialog.jLabel29.text")); // NOI18N
        aboutPanel.add(jLabel29, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 70, 300, -1));

        closeAboutDialogButton.setText(bundle.getString("AboutDialog.closeAboutDialogButton.text")); // NOI18N
        closeAboutDialogButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeAboutDialogButtonActionPerformed(evt);
            }
        });
        aboutPanel.add(closeAboutDialogButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 320, -1, -1));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 799, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(aboutPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 787, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 401, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(aboutPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 389, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void closeAboutDialogButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeAboutDialogButtonActionPerformed
        // TODO add your handling code here:
        dispose();
    }//GEN-LAST:event_closeAboutDialogButtonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel aboutPanel;
    private javax.swing.JButton closeAboutDialogButton;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    // End of variables declaration//GEN-END:variables
    private Locale locale;
}
